package cn.touna.jss.common.properties.config;

import com.baidu.disconf.client.common.annotations.DisconfFile;
import com.baidu.disconf.client.common.annotations.DisconfFileItem;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * 定时任务时间表达式配置
 *
 * @author wuwc
 */
@Component
@Scope("singleton")
//@DisconfFile(targetDirPath = "disconf", filename = "quartzCron.properties")
public class ScheduleCronProperties {

    private String dataTryCron;

    private String doWordMethod;

    private String syncModelCron;

    private String syncModelMethod;

    /**
     * 获取数据面板定时任务时间表达式
     *
     * @return
     */
    //@DisconfFileItem(name = "quartzCron.dataTryCron", associateField = "dataTryCron")
    public String getDataTryCron() {
        return dataTryCron;
    }

    @Value("${quartzCron.dataTryCron}")
    public void setDataTryCron(String dataTryCron) {
        this.dataTryCron = dataTryCron;
    }

    /**
     * 定时任务执行的方法
     *
     * @return
     */
    //@DisconfFileItem(name = "quartzCron.doWordMethod", associateField = "doWordMethod")
    public String getDoWordMethod() {
        return doWordMethod;
    }

    @Value("${quartzCron.doWordMethod}")
    public void setDoWordMethod(String doWordMethod) {
        this.doWordMethod = doWordMethod;
    }

    /**
     * 同步车型的时间表达式
     *
     * @return
     */
    //@DisconfFileItem(name = "quartzCron.syncModelCron", associateField = "syncModelCron")
    public String getSyncModelCron() {
        return syncModelCron;
    }

    @Value("${quartzCron.syncModelCron}")
    public void setSyncModelCron(String syncModelCron) {
        this.syncModelCron = syncModelCron;
    }

    /**
     * 同步车型的方法名
     *
     * @return
     */
    //@DisconfFileItem(name = "quartzCron.syncModelMethod", associateField = "syncModelMethod")
    public String getSyncModelMethod() {
        return syncModelMethod;
    }

    @Value("${quartzCron.syncModelMethod}")
    public void setSyncModelMethod(String syncModelMethod) {
        this.syncModelMethod = syncModelMethod;
    }
}
